package com.ruoyi.media.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.media.domain.Categories;
import com.ruoyi.media.service.ICategoriesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.ruoyi.common.utils.PageUtils.startPage;

/**
 * 分类管理Controller
 *
 * @author crocodilePole
 * @date 2024-11-19
 */
@RestController
@RequestMapping("/display/categories")
public class DisplayCategoriesController extends BaseController {

     @Autowired
    private ICategoriesService categoriesService;

    /**
     * 查询分类管理列表
     */
    @GetMapping("/list")
    public TableDataInfo list(Categories categories)
    {
        startPage();
        List<Categories> list = categoriesService.selectCategoriesList(categories);
        return getDataTable(list);
    }

}
